<?php
if(!isset($_SESSION['username']) and !isset($_POST['username']))	{Header("location:index.php");exit;}
if(isset($_POST['username']))
{
	require_once("../config.php");
	$rs=$dsql->getone("SELECT id FROM backuser where username='".$_POST['username']."' and  password='".md5($_POST['password'])."' and status = 'on'");
	if ($rs) 
	{
		$_SESSION['username']=$_POST['username'];
		$_SESSION['userid']=$rs;
		
		Header("location:index_user.php");
		exit;
	}
	else
	{
		Header("location:index.php?e");
		exit;
	}
	
}



?>